package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzHuxingMapper;
import com.ruoyi.system.domain.DzHuxing;
import com.ruoyi.system.service.IDzHuxingService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 户型信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-16
 */
@Service
public class DzHuxingServiceImpl implements IDzHuxingService 
{
    @Autowired
    private DzHuxingMapper dzHuxingMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询户型信息
     * 
     * @param hxId 户型信息主键
     * @return 户型信息
     */
    @Override
    public DzHuxing selectDzHuxingByHxId(Long hxId)
    {
        return dzHuxingMapper.selectDzHuxingByHxId(hxId);
    }

    /**
     * 查询户型信息列表
     * 
     * @param dzHuxing 户型信息
     * @return 户型信息
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzHuxing> selectDzHuxingList(DzHuxing dzHuxing)
    {

        return dzHuxingMapper.selectDzHuxingList(dzHuxing);
    }

    @Override
    public List<DzHuxing> selectDzHuxingListWeb(DzHuxing dzHuxing)
    {
        return dzHuxingMapper.selectDzHuxingList(dzHuxing);
    }

    /**
     * 新增户型信息
     * 
     * @param dzHuxing 户型信息
     * @return 结果
     */
    @Override
    public int insertDzHuxing(DzHuxing dzHuxing)
    {
        return dzHuxingMapper.insertDzHuxing(dzHuxing);
    }

    /**
     * 修改户型信息
     * 
     * @param dzHuxing 户型信息
     * @return 结果
     */
    @Override
    public int updateDzHuxing(DzHuxing dzHuxing)
    {
        return dzHuxingMapper.updateDzHuxing(dzHuxing);
    }

    /**
     * 批量删除户型信息
     * 
     * @param hxIds 需要删除的户型信息主键
     * @return 结果
     */
    @Override
    public int deleteDzHuxingByHxIds(Long[] hxIds)
    {
        return dzHuxingMapper.deleteDzHuxingByHxIds(hxIds);
    }

    /**
     * 删除户型信息信息
     * 
     * @param hxId 户型信息主键
     * @return 结果
     */
    @Override
    public int deleteDzHuxingByHxId(Long hxId)
    {
        return dzHuxingMapper.deleteDzHuxingByHxId(hxId);
    }
}
